<div class="menus">
<h2>List Menuses</h2>

<table cellpadding="0" cellspacing="0">
	<tr>
		<th><?php echo $paginator->sort('id');?></th>
		<th><?php echo $paginator->sort('name');?></th>
		<th><?php echo $paginator->sort('url');?></th>
		<th><?php echo $paginator->sort('position');?></th>
		<th><?php echo $paginator->sort('icon');?></th>
		<th><?php echo $paginator->sort('parent_id');?></th>
		<th><?php echo $paginator->sort('section_id');?></th>
		<th><?php echo $paginator->sort('access_level');?></th>
		<th>Actions</th>
	</tr>
<?php foreach ($menus as $menu): ?>
	<tr>
		<td><?php echo $menu['Menu']['id']; ?></td>
		<td><?php echo $menu['Menu']['name']; ?></td>
		<td><?php echo $menu['Menu']['url']; ?></td>
		<td><?php echo $menu['Menu']['position']; ?></td>
		<td><?php echo $menu['Menu']['icon']; ?></td>
		<td><?php echo $menu['Menu']['parent_id']; ?></td>
		<td><?php echo $html->link($menu['Section']['name'], array('controller'=> 'sections', 'action'=>'view', $menu['Section']['id'])); ?></td>
		<td><?php echo $menu['Menu']['access_level']; ?></td>
		<td class="actions">
			<?php echo $html->link('View', array('action'=>'view', $menu['Menu']['id'])); ?>
			<?php echo $html->link('Edit', array('action'=>'edit', $menu['Menu']['id'])); ?>
			<?php echo $html->link('Delete', array('action'=>'delete', $menu['Menu']['id']), null, 'Are you sure you want to delete #' . $menu['Menu']['id']); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>

</div>
<div class="paging">
<?php echo $paginator->prev('<< previous', array(), null, array('class'=>'disabled'));?>
|
<?php echo $paginator->next('next >>', array(), null, array('class'=>'disabled'));?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link('New Menu', array('action'=>'add')); ?></li>
	</ul>
</div>